﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using Dtf.Core.Remoting;
using ResourceManager;

namespace Dtf.Core.Resources
{
    public class Win32StringProvider : ResourceProvider
    {
        public Win32StringProvider(string resourceTypeName)
            : base(resourceTypeName)
        {
        }


        public override string ExtractString(string fileName, string[] tokens)
        {
            if (tokens == null || tokens.Length != 1)
            {
                throw new ResourceKeyException();
            }

            return new ResourceFetcher().GetStringNameFromResources(null, fileName, tokens[0]);
        }

    }
}
